package icloud.com.myapplication.ui.activity

import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import icloud.com.myapplication.R

/***
 * Kotlin语言案例
 */
class KotlinTestActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_kotlin_test)
        //
        fun sum(a:Int,b:Int)=a+b;
    }

    /***
     * 返回a+b的和
     */
    fun  sum(a:Int,b:Int):Int{
        return  a+b;
    }

    override fun onStart() {
        super.onStart()
    }

    override fun onRestart() {
        super.onRestart()
    }
    
    override fun onResume() {
        super.onResume()
    }

    override fun onStop() {
        super.onStop()
    }

    override fun onDestroy() {
        super.onDestroy()
    }
}
